import request from '@/request'

// 登录请求发送
export function login(username, password , uuid , captcha) {
  const data = {
    username ,
    password ,
    uuid ,
    captcha ,
  }
  return request({
    url: '/user/forumUser/login',
    method: 'post',
    data
  })
}

// 登出
export function logout(token) {
  return request({
    headers: {'Authorization': token},
    url: '/user/forumUser/logout',
    method: 'get'
  })
}


// 获取用户信息
export function getUserInfo(token) {
  return request({
    headers: {'Authorization': token},
    url: '/user/forumUser/currentUser',
    method: 'get'
  })
}

// 发送注册1请求
export function register(
   username ,
   nickname , 
   password ,
   email ,
   mobile ,
   status ,
   ) {
  const data = {
    userName: username ,
    userNickname: nickname ,
    password: password ,
    userEmail: email ,
    userPhonenum: mobile ,
    userStatus: status ,
  }
  return request({
    url: '/user/forumUser/register',
    method: 'post',
    data
  })
}